#ifndef _LOGIN_SERVICE_H
#define _LOGIN_SERVICE_H
#include "../NetCore/xNetService.h"
#include "../NetCore/xNetThread.h"
#include "LoginRunThread.h"
using namespace xNet;

extern std::string      g_server_addr;
extern uint16_t         g_server_port;
extern uint32_t         g_server_id; 

class LoginService : public xNetService
{
    public:
        static LoginService* GetInstance()
        {
            static LoginService instance;
            return &instance;
        }
    private:
        LoginService();
        ~LoginService() = default;
    public:
        bool NewTCPTask(xSocket* socket) override;
        bool Init() override;
        void Finish();
    private:
        xNetThread* m_netThread;
        LoginRunThread* m_gameThread;
};

#endif